@echo off

title "Registering SPICE activeX module for python"

echo.
echo.
echo Running makepy on the newly installed SPICE activeX automation server
echo.
echo This will ensure that the python module used for communication with 
echo SPICE is up to date
echo.
echo.

rem Change the next line to reflect the location of makepy.py
set makepypath="C:\Python27\lib\site-packages\win32com\client"

python.exe "%makepypath%\makepy.py" -o "PySpice\spice_activeX.py" "C:\SPICE\bin\spice.tlb"

echo Registration completed
echo.
echo.
echo Now building the PySpice installer
echo.

python.exe setup.py bdist_wininst
cd dist 
PySpice-1.0.win-amd64.exe
cd ..
rem pause
rem exit
